<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<h2>목록</h2>

<form id="form" name="form" method="get" action="/sale/list.html">
<table>
	<tr>
		<th>키워드</th>
		<td><input type="text" name="keyword" value="${search.keyword}" /></td>
		<td><input type="submit" value="검색"/></td>
	</tr>
</table>
</form>

<table>
	<tr>
		<th>이미지</th>
		<th>상품명</th>
		<th>매장명</th>
		<th>위치</th>
		<th>세일 from</th>
		<th>세일 to</th>
		<th>시작일</th>
		<th>종료일</th>
	</tr>
	<c:forEach items="${saleList}" var="each">
	<tr>
		<td><img src="${each.photoUrl2}" width="80" height="60"></td>
		<td><a href="/sale/view.html?id=${each.id}">${each.productName}</a></td>
		<td>${each.shopName}</td>
		<td>${each.locationAddress}</td>
		<td>${each.saleOffFrom}</td>
		<td>${each.saleOffTo}</td>
		<td>${each.saleDateFrom}</td>
		<td>${each.saleDateTo}</td>
	</tr>	
	</c:forEach>
</table>
<div>
<p><a href="/sale/form.html">등록</a></p>
</div>